Skip to content

Keep SQL scaling available after worker shutdown - #337

Merged
andystaples merged 1 commit into
mainfrom
andystaples-icm-incident-investigation
Nov 12, 2026
Merged

andystaples merged 1 commit into
mainfrom
andystaples-icm-incident-investigation

Conversation

@andystaples

Copy link
Copy Markdown
Contributor

Summary

Scale recommendation queries currently inherit the task hub worker's shutdown token when the caller passes CancellationToken.None. Runtime scale monitoring can continue polling after the worker stops, causing SQL target scaler votes to fail with TaskCanceledException.

Open the scale-query connection using only the caller's cancellation token, independently of worker shutdown. Worker polling cancellation, scaling calculations, and database contracts remain unchanged.

Add regression coverage that verifies a real pending backlog is still reported after service shutdown and that explicit caller cancellation is honored. Update the scaling documentation to describe the independent query lifetime.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@andystaples
andystaples merged commit 7396c7b into main Nov 12, 2026
5 checks passed
@andystaples
andystaples deleted the andystaples-icm-incident-investigation branch November 12, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants